<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<script>
$(document).ready(function(){
	$("#rigisterBtn").click(function(){
		var title = $("input[name=title]");
		var content = $("textarea[name=content]");
		if(title.val()==""){
			alert("제목을 입력하세요!");
			title.focus();
			return false;
		}
		if(content.val()==""){
			alert("내용을 입력하세요!");
			content.focus();
			return false;
		}
		$("#registerForm").submit();
	});
});

</script>

<h1>게시물등록</h1>
<form id="registerForm" action="freeboard.do?command=freeBoardRegister" method="post">
<input style="width: 650px" type="text" name="title" placeholder="제목을 입력하세요"><br>
<textarea name="content" cols="90" rows="20" placeholder="내용을 입력하세요" ></textarea>
<input id="rigisterBtn" type="button" value="전송">
</form>
